#include "tdp2_inlinezlibstate.hpp"

namespace TDP
{
	namespace Compression
	{
		Zlib::inflate_state inflateState;
		UInt8 window[32768];

		void *InlineInflateState::zalloc(void *opaque, unsigned int items, unsigned int size)
		{
			InlineInflateState *iis = static_cast<InlineInflateState *>(opaque);
			if(items * size == sizeof(Zlib::inflate_state))
				return &iis->inflateState;
			return iis->window;
		}

		void *InlineInflateState::zfree(void *opaque, void *address)
		{
		}
	}
}
